package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 
 * @TableName prescription
 */
@TableName(value ="prescription")
public class Prescription {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Medical record ID
     */
    @TableField(value = "medical_record_id")
    private Integer medicalRecordId;

    /**
     * Registration ID
     */
    @TableField(value = "registration_id")
    private Integer registrationId;

    /**
     * Doctor ID
     */
    @TableField(value = "doctor_id")
    private Integer doctorId;

    /**
     * prescription name
     */
    @TableField(value = "name")
    private String name;

    /**
     * Creation time
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * Status
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Medical record ID
     */
    public Integer getMedicalRecordId() {
        return medicalRecordId;
    }

    /**
     * Medical record ID
     */
    public void setMedicalRecordId(Integer medicalRecordId) {
        this.medicalRecordId = medicalRecordId;
    }

    /**
     * Registration ID
     */
    public Integer getRegistrationId() {
        return registrationId;
    }

    /**
     * Registration ID
     */
    public void setRegistrationId(Integer registrationId) {
        this.registrationId = registrationId;
    }

    /**
     * Doctor ID
     */
    public Integer getDoctorId() {
        return doctorId;
    }

    /**
     * Doctor ID
     */
    public void setDoctorId(Integer doctorId) {
        this.doctorId = doctorId;
    }

    /**
     * prescription name
     */
    public String getName() {
        return name;
    }

    /**
     * prescription name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Creation time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * Creation time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * Status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * Status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Prescription other = (Prescription) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMedicalRecordId() == null ? other.getMedicalRecordId() == null : this.getMedicalRecordId().equals(other.getMedicalRecordId()))
            && (this.getRegistrationId() == null ? other.getRegistrationId() == null : this.getRegistrationId().equals(other.getRegistrationId()))
            && (this.getDoctorId() == null ? other.getDoctorId() == null : this.getDoctorId().equals(other.getDoctorId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMedicalRecordId() == null) ? 0 : getMedicalRecordId().hashCode());
        result = prime * result + ((getRegistrationId() == null) ? 0 : getRegistrationId().hashCode());
        result = prime * result + ((getDoctorId() == null) ? 0 : getDoctorId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", medicalRecordId=").append(medicalRecordId);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", doctorId=").append(doctorId);
        sb.append(", name=").append(name);
        sb.append(", createTime=").append(createTime);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }
}